package 继承;

public class Cylinder extends Circle {
    private double length;

    public Cylinder(){
        length=1;
    }

    public Cylinder(double length){
        this.length = length;
    }
    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }


    public double findTij() {
        //return Cylinder.this.findArea()*length;
        double tiji = findArea()*length;
        return tiji;
    }

    public static void main(String[] args) {
        Cylinder cylinder = new Cylinder();
        System.out.println("圆面积:"+cylinder.findArea());
        System.out.println("体积:"+cylinder.findTij());
    }
}
